As data processing systems increase in complexity whilst it is desired to also reduce development time for new systems, there is a need to improve the debug and tracing tools and mechanisms that may be used within the development of data processing systems.
Tracing the activity of a data processing system whereby a trace stream is generated including data representing the step-by-step activity within the system is a highly useful tool in system development. However, with the general move towards more deeply embedded processor cores, it becomes more difficult to track the state of the processor core via externally accessible pins. Accordingly, off-chip tracing mechanisms for capturing and analyzing trace data and increased amounts of tracing functionality are being placed on-chip. Examples of such on-chip tracing mechanisms are the Embedded Trace Macrocell provided by ARM Limited, Cambridge, England in association with their ARM7 and ARM9 processors. Such tracing mechanisms produce in real time a trace stream of data representing activities of the data processing system that are desired to be traced. This trace stream can then subsequently be used to facilitate debugging of sequences ofprocessing instructions being executed by the data processing system.
Another process that is used to facilitate debugging of processing instructions executed by the data processing system involves the inclusion of debugging mechanisms which are used to detect predetermined events, and which upon detection of such a predetermined event are arranged to cause the data processing system to halt execution to enable debugging to be performed. Such debugging mechanisms are clearly more invasive than tracing mechanisms, but both mechanisms are useful for facilitating debugging of sequences of processing instructions during the development of data processing systems.
It is known to provide tracing and debugging mechanisms incorporating trigger points that serve to control the tracing and debugging operation, such as starting or stopping tracing upon access to a particular register, address or data value. Such mechanisms are very useful for diagnosing specific parts of a system or types of behaviour. As an example, if a particular system bug is associated with exception behaviour, then tracing the full operation of the system would produce an inconveniently large volume of data when what is really required is tracing of the exception behaviour with this being triggered upon access to the appropriate exception handling vector.
The sequences of processing instructions executed by the data processing system are typically placed in a memory, with the memory having a predefined address space. The processor core of the data processing system may have multiple states of operation, with each state of operation requiring a number of sequences of processing instructions. Often, the memory's address space is not large enough to hold all instructions and data required by the processor core, and accordingly it is common for sequences of data processing instructions to be swapped in and out of the memory, dependent on the state of operation of the processor core. In such situations, it is possible that sequences of processing instructions from different states of operation may occupy overlapping regions in the address space.
It will be appreciated that it is difficult to reliably operate such tracing and debugging mechanisms in situations where processing instructions may occupy overlapping regions in the address space, since it is difficult to reliably identify trigger points based on instruction addresses. When using debugging mechanisms, this may result in the data processing system halting execution unnecessarily in certain instances, whereas when employing tracing mechanisms to facilitate subsequent debugging, such situations may result in more data being traced than is actually required, or unintended data being traced in place of that which was intended.
Accordingly, it would be desirable to provide a system and method which provides for improved tracing and debugging in such data processing systems.